Proving the Correctness of Recursion-based Automatic Program Transformations 1
نویسنده
چکیده
This paper shows how the Improvement Theorem|a semantic condition for establishing the total correctness of program transformation on higher-order functional programs|has practical value in proving the correctness of automatic techniques. To this end we develop and study a family of automatic program transformations. The root of this family is a well-known and widely studied transformation called deforestation; descendants include generalisations to richer input languages (e.g. higher-order functions), and more powerful transformations, including a source-level representation of some of the techniques known from Turchin's supercom-piler.
منابع مشابه
Proving the Correctness of Recursion-Based Automatic Program Transformations
This paper shows how the Improvement Theorem|a semantic condition for the total correctness of program transformation on higher-order functional programs|has practical value in proving the correctness of automatic techniques, including deforestation and supercompilation. This is aided by a novel formulation (and generalisation) of deforestation-like transformations, which also greatly adds to t...
متن کاملProving Horn Clause Specifications of Imperative Programs
We present a method for verifying the correctness of an imperative program with respect to a specification defined in terms of a set of possibly recursive Horn clauses. Given a program prog, we consider a partial correctness specification of the form {φ} prog {ψ}, where the assertions φ and ψ are predicates defined by a set Spec of Horn clauses. The verification method consists in: (i) encoding...
متن کاملUnifying Correctness Statements
Partial, total and general correctness and further models of sequential computations differ in their treatment of finite, infinite and aborting executions. Algebras structure this diversity of models to avoid the repeated development of similar theories and to clarify their range of application. We introduce algebras that uniformly describe correctness statements, correctness calculi, pre-post ...
متن کاملFoundations for a Practical Theory of Program Refinement and Transformation
A wide spectrum language is presented, which is designed to facilitate the proof of the correctness of refinements and transformations. Two different proof methods are introduced and used to prove some fundamental transformations, including a general induction rule (Lemma 3.9) which enables transformations of recursive and iterative programs to be proved by induction on their finite truncations...
متن کاملAutomatic Correctness Proofs for Logic Program Transformations
The many approaches which have been proposed in the literature for proving the correctness of unfold/fold program transformations, consist in associating suitable well-founded orderings with the proof trees of the atoms belonging to the least Herbrand models of the programs. In practice, these orderings are given by ‘clause measures’, that is, measures associated with the clauses of the program...
متن کامل